package com.pd.backend.web.controller;


import com.pd.backend.entity.PdTaskTransport;
import com.pd.backend.service.PdTaskTransportService;
import com.pd.backend.vo.req.PdOrderGetPageReqVo;
import com.pd.backend.vo.req.PdOrderReqVo;
import com.pd.backend.vo.resp.GetPageVo;
import com.pd.backend.vo.resp.R;
import com.pd.backend.vo.resp.TransportOrderManagerPage;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Objects;

/**
 * 运输任务表(PdTaskTransport)表控制层
 *
 * @author GuoXinChao.126@gmail.com
 * @since 2023-02-27 17:11:37
 */
@RestController
@RequestMapping
public class PdTaskTransportController {
    /**
     * 服务对象
     */
    @Resource
    private PdTaskTransportService pdTaskTransportService;


    @PostMapping(path = "/tms/api/web-manager/transport-order-manager/page")
    public R<GetPageVo<TransportOrderManagerPage>> getTransportPage(@RequestBody PdOrderGetPageReqVo pdOrderGetPageReqVo){
        System.out.println(pdOrderGetPageReqVo);
        R<GetPageVo<TransportOrderManagerPage>> p =  pdTaskTransportService.getTransportPage(pdOrderGetPageReqVo);
    if (Objects.isNull(p)){
        return R.error("请求失败");
    }
    return p;
    }


}

